package com.xwt.pattern.singleton;

import com.xwt.pattern.utils.Utils;

/**
 * Author:  Steven Xiao
 * Description: 通用单例模式
 * Date:  2016/3/10
 * Time:  17:02
 */
public class SingletonPattern {
    private static  final SingletonPattern singletonPattern =new SingletonPattern();
    private SingletonPattern(){
    }

    public synchronized static SingletonPattern getInstance(){
        return singletonPattern;
    }

    public static void emperorInfo(){
        Utils.println("我就是皇帝李世民.....");
    }
}
